package main

import "fmt"

func main() {

	// 函数作为实参
	maxf := func(a int, b int) int {
		var result int
		if a > b {
			result = a
		} else {
			result = b
		}
		return result
	}
	fmt.Print(maxf(1, 2))
}
